(1) Field of the Invention
The present invention relates to an image coding apparatus and image coding method for coding video according to the H.264 standard.
(2) Description of the Related Art
In recent years, recording methods using the H.264 standard, which allows for a high coding-compression rate, are becoming predominant in the recording high-vision video using recording devices such as Blu-ray Disc (BD) recorders or Digital Versatile Disc (DVD) recorders and imaging devices such as camcorders.
In the H.264 standard, the maximum code amount per macroblock, which is a unit of coding, is limited, as described in Non-Patent Reference 1 (ISO/IEC 14496-10:2005). Specifically, the maximum code amount is defined to be 3200 bits in the case of the 8 bit 4:2:0 format.
When the code amount exceeds 3200 bits as a result of coding a macroblock, it is necessary to change the conditions for coding and perform coding on the macroblock again, as described in Patent Reference 1 (Japanese Unexamined Patent Application Publication No. 2004-135251). Alternatively, there is a method of setting the macroblock type of the macroblock to Intra macroblock_Pulse Code Modulation (I_PCM) and outputting uncompressed image data in place of coded data, without performing the re-coding of the macroblock whose code amount exceeds 3200 bits.
In such manner, conventionally, when the code amount of coded data exceeds the predetermined amount, a bit stream which conforms to the standard is generated by re-coding the current block to be coded or outputting uncompressed video data in place of coded data.